//导入模板引擎


var fs = require('fs')

var http = require('http')


var server = http.createServer()

var template = require('art-template')


server.on('request', function(req, res) {

    fs.readFile('./index.html', function(err, data) {

        var tet = template.render(data.toString(), {
            name: '你好'
        })
        res.end(tet)
    })
})

server.listen(3000, function() {
    console.log('server is runing...')
})